package master.photo.controller

import org.springframework.beans.factory.annotation.Autowired;

import master.photo.service.FriendFinderService;

class FriendController {
	
	@Autowired
	private FriendFinderService friendFinder; 
	
	def index = {
		redirect(action: "list", params: params)
	}
	
	def list = {
		def userLoggedIn = session['USER_LOGGED_IN'];
		def friends = friendFinder.findFriends(userLoggedIn.id);
		[friendsList: friends]
	}
	
}
